package com.inight.nightojbackendjudgeservice.controller.inner;


import com.inight.nightojbackendjudgeservice.judge.JudgeService;
import com.inight.nightojbackendserviceclient.service.JudgeFeignClient;
import nightojbackendmodel.entity.QuestionSubmit;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;


/**
 * 该服务仅是内部服务调用, 不暴露给前端
 */
@RestController
@RequestMapping("/inner")
public class JudgeInnerController implements JudgeFeignClient {

    // 调用用户的 service
    @Resource
    private JudgeService judgeService;


    @Override
    @GetMapping("/do")
    public QuestionSubmit doJudge(long questionSubmitId) {
        return judgeService.doJudge(questionSubmitId);
    }
}
